﻿
using BCCommon;
using BCCommon.Enums;
using BCData.Sim.Admin.StaffOrganizationMappingRecord;
using BCDto.Sim.Admin.StaffOrganizationMappingRecord;
using BCEntity.Sim.Admin.StaffOrganizationMappingRecord;
using BCService.Utils;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BCService.Sim.Admin.StaffOrganizationMappingRecord
{
    /// <summary>
    /// 员工组织映射记录
    /// </summary>
    public interface IStaffOrganizationMappingRecordService
    {
        #region  成员方法
        /// <summary>
        /// 是否存在此记录
        /// </summary>
        /// <param name="staffOrganizationMappingRecordId">员工组织映射记录Id</param>
        bool Exists(long staffOrganizationMappingRecordId);
        /// <summary>
        /// 添加员工组织映射记录
        /// </summary>
        /// <param name="requestDto">员工组织映射记录信息</param>
        StaffOrganizationMappingRecordDto Add(StaffOrganizationMappingRecordRequestDto requestDto);
        /// <summary>
        /// 更新员工组织映射记录
        /// </summary>
        /// <param name="putDto">员工组织映射记录信息</param>
        StaffOrganizationMappingRecordDto Update(StaffOrganizationMappingRecordPutDto putDto);
        /// <summary>
        /// 删除员工组织映射记录
        /// </summary>
        /// <param name="staffOrganizationMappingRecordId">员工组织映射记录Id</param>
        bool Delete(long staffOrganizationMappingRecordId);
        /// <summary>
        /// 获取员工组织映射记录
        /// </summary>
        /// <param name="staffOrganizationMappingRecordId">员工组织映射记录Id</param>
        StaffOrganizationMappingRecordDto GetEntity(long staffOrganizationMappingRecordId);
        /// <summary>
        /// 获取员工组织映射记录
        /// </summary>
        /// <param name="adminId">员工Id</param>
        StaffOrganizationMappingRecordDto GetEntityByAdminId(long adminId);
        /// <summary>
        /// 设置员工组织映射记录为活动记录
        /// </summary>
        /// <param name="staffOrganizationMappingRecordId">员工组织映射记录Id</param>
        void SetActiveRole(long staffOrganizationMappingRecordId);
        /// <summary>
        /// 获取员工组织映射记录为活动记录
        /// </summary>
        /// <param name="staffOrganizationMappingRecordId">员工组织映射记录Id</param>
        /// <returns></returns>
        StaffOrganizationMappingRecordDto GetActiveRole(long staffOrganizationMappingRecordId);
        /// <summary>
        /// 获取员工组织映射记录列表
        /// </summary>
        /// <param name="adminId">员工Id</param>
        IEnumerable<StaffViewDto> GetList(long adminId);
        /// <summary>
        /// 获取员工组织映射记录列表(公司下所有员工)
        /// </summary>
        /// <param name="companyId">公司Id</param>
        IEnumerable<StaffViewDto> GetCompanyStaffList(int companyId);
        /// <summary>
        /// 获取员工资质映射记录列表（部门下所有员工）
        /// </summary>
        /// <param name="departmentId">部门Id</param>
        /// <returns></returns>
        IEnumerable<StaffViewDto> GetDepartmentStaffList(int departmentId);
        /// <summary>
        /// 获取员工资质映射记录列表（仅当前部门下所有员工，不包含子级）
        /// </summary>
        /// <param name="departmentId">部门Id</param>
        /// <returns></returns>
        IEnumerable<StaffViewDto> GetCurrentlyDepartmentStaffList(int departmentId);
        /// <summary>
        /// 获取无部门公司员工列表
        /// </summary>
        /// <param name="companyId">公司Id</param>
        /// <param name="departmentId">部门Id</param>
        /// <returns></returns>
        IEnumerable<StaffViewDto> GetNoneStaffList(int companyId, int departmentId);
        /// <summary>
        /// 获取员工资质映射记录列表（此职位的所有员工）
        /// </summary>
        /// <param name="jobTitleKey">职位</param>
        /// <returns></returns>
        IEnumerable<StaffViewDto> GetJobTitleStaffList(string jobTitleKey);
        /// <summary>
        /// 获取员工列表
        /// </summary>
        /// <param name="staffName">员工姓名</param>
        /// <returns></returns>
        IEnumerable<StaffViewDto> GetStaffList(string staffName);
        /// <summary>
        /// 获取员工组织映射记录分页列表
        /// </summary>
        /// <param name="companyName">公司名称</param>
        /// <param name="departmentName">部门名称</param>
        /// <param name="adminName">员工姓名</param>
        /// <param name="start">开始时间</param>
        /// <param name="end">结束时间</param>
        /// <param name="pageIndex">当前页码</param>
        /// <param name="pageSize">员工组织映射记录每页数据条数</param>
        PageableList<StaffOrganizationMappingRecordDto> Query(string companyName,string departmentName,string adminName, DateTime? start, DateTime? end, int pageIndex, int pageSize);
        #endregion  成员方法
    }
}